import Vue from 'vue';
import Router from 'vue-router';
import Login from './views/Login';
import Home from './views/home/Home';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/home',
            name: '首页',
            component: Home
        },
        {
            path: '/login',
            name: '登陆',
            component: Login,
        },
        {
            path: '/myQrCode',
            name: '推广二维码',
            component: () => import('./views/MyQrCode.vue')
        },
        {
            path: '/notes',
            name: '笔记列表',
            component: () => import('./views/note/NoteList.vue')
        },
        {
            path: '/notes/:id',
            name: '笔记主页',
            component: () => import('./views/note/Note.vue')
        },
        {
            path: '*',
            redirect: '/login'
        }
    ]
});
